<?php
namespace app\admin\controller;
use think\Controller;

class Authentication extends Controller
{
    public function _initialize()
    {
        //判断用户登录状态
        if(!session('user_name')){
          $this->error('登录验证后再进行页面操作！',url('Login/index'));
        }
    }
}